<template>
  <div class="about-container">
    <!-- 页面头部 -->
    <div class="page-header">
      <div class="header-bg"></div>
      <div class="header-content">
        <h1 class="page-title">关于我们</h1>
        <p class="page-subtitle">让闲置物品找到新主人，让环保理念传递校园</p>
      </div>
    </div>

    <!-- 主内容区 -->
    <div class="main-content">
      <!-- 平台简介 -->
      <section class="intro-section">
        <div class="container">
          <div class="section-header">
            <h2 class="section-title">平台简介</h2>
            <div class="section-divider"></div>
          </div>
          <div class="intro-content">
            <div class="intro-text">
              <p>校园二手交易平台是一个专为在校师生打造的闲置物品交易社区，致力于帮助大家将闲置物品进行有效流通，同时倡导环保、节约的校园文化。</p>
              <p>我们相信，每一件闲置物品都有其价值，只是暂时没有找到需要它的人。通过我们的平台，您可以轻松发布、浏览和购买各种二手商品，让资源得到最大化利用。</p>
            </div>
            <div class="intro-image">
              <img src="https://via.placeholder.com/600x400" alt="校园二手交易平台" />
            </div>
          </div>
        </div>
      </section>

      <!-- 我们的使命 -->
      <section class="mission-section">
        <div class="container">
          <div class="section-header">
            <h2 class="section-title">我们的使命</h2>
            <div class="section-divider"></div>
          </div>
          <div class="mission-cards">
            <div class="mission-card">
              <div class="card-icon">
                <el-icon class="icon"><i-ep-trend-chart /></el-icon>
              </div>
              <h3 class="card-title">促进资源循环</h3>
              <p class="card-description">通过二手交易，减少资源浪费，延长物品使用寿命，促进校园资源的有效循环利用。</p>
            </div>
            <div class="mission-card">
              <div class="card-icon">
                <el-icon class="icon"><i-ep-share /></el-icon>
              </div>
              <h3 class="card-title">搭建交流平台</h3>
              <p class="card-description">为师生提供一个安全、便捷的交易环境，促进校园内的交流与互助。</p>
            </div>
            <div class="mission-card">
              <div class="card-icon">
                <el-icon class="icon"><i-ep-lightbulb /></el-icon>
              </div>
              <h3 class="card-title">培养环保意识</h3>
              <p class="card-description">通过二手交易活动，培养师生的环保意识和节约习惯，共建绿色校园。</p>
            </div>
          </div>
        </div>
      </section>

      <!-- 平台优势 -->
      <section class="advantages-section">
        <div class="container">
          <div class="section-header">
            <h2 class="section-title">平台优势</h2>
            <div class="section-divider"></div>
          </div>
          <div class="advantages-list">
            <div class="advantage-item">
              <el-icon class="advantage-icon"><i-ep-check /></el-icon>
              <span class="advantage-text">专注校园：只服务于在校师生，确保交易安全</span>
            </div>
            <div class="advantage-item">
              <el-icon class="advantage-icon"><i-ep-check /></el-icon>
              <span class="advantage-text">便捷高效：简单易用的发布和浏览功能，快速找到心仪商品</span>
            </div>
            <div class="advantage-item">
              <el-icon class="advantage-icon"><i-ep-check /></el-icon>
              <span class="advantage-text">丰富品类：涵盖数码产品、图书文具、服饰鞋包、生活用品等多种类别</span>
            </div>
            <div class="advantage-item">
              <el-icon class="advantage-icon"><i-ep-check /></el-icon>
              <span class="advantage-text">真实可靠：实名认证机制，保障交易双方权益</span>
            </div>
            <div class="advantage-item">
              <el-icon class="advantage-icon"><i-ep-check /></el-icon>
              <span class="advantage-text">价格透明：卖家自主定价，买家可与卖家协商，无中间差价</span>
            </div>
            <div class="advantage-item">
              <el-icon class="advantage-icon"><i-ep-check /></el-icon>
              <span class="advantage-text">校园支持：线下交易地点便利，支持面对面验货</span>
            </div>
          </div>
        </div>
      </section>

      <!-- 发展历程 -->
      <section class="history-section">
        <div class="container">
          <div class="section-header">
            <h2 class="section-title">发展历程</h2>
            <div class="section-divider"></div>
          </div>
          <div class="timeline">
            <div class="timeline-item">
              <div class="timeline-dot"></div>
              <div class="timeline-content">
                <div class="timeline-year">2023年9月</div>
                <h3 class="timeline-title">平台正式上线</h3>
                <p class="timeline-description">校园二手交易平台正式上线，首批入驻学生超过1000人。</p>
              </div>
            </div>
            <div class="timeline-item">
              <div class="timeline-dot"></div>
              <div class="timeline-content">
                <div class="timeline-year">2023年12月</div>
                <h3 class="timeline-title">首次校园推广活动</h3>
                <p class="timeline-description">举办首次线下推广活动，参与人数达到500+，交易额突破10万元。</p>
              </div>
            </div>
            <div class="timeline-item">
              <div class="timeline-dot"></div>
              <div class="timeline-content">
                <div class="timeline-year">2024年3月</div>
                <h3 class="timeline-title">用户突破1万人</h3>
                <p class="timeline-description">平台注册用户突破1万人，累计交易额达到50万元。</p>
              </div>
            </div>
            <div class="timeline-item">
              <div class="timeline-dot"></div>
              <div class="timeline-content">
                <div class="timeline-year">2024年9月</div>
                <h3 class="timeline-title">平台全新升级</h3>
                <p class="timeline-description">平台进行全新升级，新增多种功能，优化用户体验。</p>
              </div>
            </div>
          </div>
        </div>
      </section>

      <!-- 加入我们 -->
      <section class="join-section">
        <div class="container">
          <div class="join-content">
            <h2 class="join-title">加入我们</h2>
            <p class="join-description">无论您是想发布闲置物品，还是寻找性价比高的二手商品，我们都欢迎您的加入！</p>
            <div class="join-actions">
              <router-link to="/publish" class="join-button primary-button">发布商品</router-link>
              <router-link to="/products" class="join-button secondary-button">浏览商品</router-link>
            </div>
          </div>
        </div>
      </section>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { onMounted } from 'vue'

const router = useRouter()

onMounted(() => {
  // 设置页面标题
  document.title = '关于我们 - 校园二手交易平台'
})
</script>

<style scoped>
.about-container {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
}

/* 页面头部样式 */
.page-header {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  z-index: 1;
}

.header-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.page-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* 主内容区样式 */
.main-content {
  flex: 1;
  padding: 80px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0 auto;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.section-header:hover .section-divider {
  width: 120px;
}

/* 平台简介样式 */
.intro-section {
  margin-bottom: 120px;
}

.intro-content {
  display: flex;
  gap: 60px;
  align-items: center;
  flex-wrap: wrap;
}

.intro-text {
  flex: 1;
  min-width: 300px;
}

.intro-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 20px;
}

.intro-image {
  flex: 1;
  min-width: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-image:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.intro-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* 使命卡片样式 */
.mission-section {
  margin-bottom: 120px;
  background-color: #f8f9fa;
  padding: 80px 0;
}

.mission-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.mission-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border-top: 4px solid transparent;
}

.mission-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-top-color: #667eea;
}

.card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 50%;
}

.card-icon .icon {
  font-size: 32px;
  color: #667eea;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.card-description {
  color: #666;
  line-height: 1.6;
}

/* 平台优势样式 */
.advantages-section {
  margin-bottom: 120px;
}

.advantages-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.advantage-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.advantage-item:hover {
  background-color: rgba(102, 126, 234, 0.1);
  transform: translateX(10px);
}

.advantage-icon {
  color: #667eea;
  font-size: 20px;
}

.advantage-text {
  color: #333;
  font-size: 16px;
}

/* 发展历程样式 */
.history-section {
  margin-bottom: 120px;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #667eea, #764ba2);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 20px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
  z-index: 1;
}

.timeline-content {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.timeline-content:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-left-color: #667eea;
  transform: translateX(5px);
}

.timeline-year {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.timeline-description {
  color: #666;
  line-height: 1.6;
}

/* 加入我们样式 */
.join-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 0;
}

.join-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.join-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
}

.join-description {
  font-size: 18px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.join-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.join-button {
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 160px;
}

.primary-button {
  background: white;
  color: #667eea;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.secondary-button {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.secondary-button:hover {
  background: white;
  color: #667eea;
  transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-title {
    font-size: 36px;
  }
  
  .intro-content {
    flex-direction: column;
    gap: 40px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .join-title {
    font-size: 32px;
  }
  
  .timeline {
    padding-left: 30px;
  }
  
  .timeline::before {
    left: 10px;
  }
  
  .timeline-dot {
    left: 0;
  }
}

@media (max-width: 480px) {
  .page-header {
    height: 300px;
  }
  
  .page-title {
    font-size: 28px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .mission-card {
    padding: 30px 20px;
  }
  
  .join-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .join-button {
    width: 100%;
    max-width: 250px;
  }
}
</style>